package com.aurora.app.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

import com.aurora.base.entity.BaseEntity;

@Entity
@Table(name = "tb_weixin_app_token")
public class WeixinAppToken extends BaseEntity {
	//private String id;

	private String appId;// 应用ID

	private String appSecret;// 应用密钥

	private String accessToken;// token

	private Date time;// 时间搓

	private String jsapiTicket;// jsapiTicket

	private Date jsapiTime;// 时间搓

	//private String accountId;

//	@Column(name = "WEIXIN_ACCOUNTID")
//	public String getAccountId() {
//		return this.accountId;
//	}
//	public void setAccountId(String accountId) {
//		this.accountId = accountId;
//	}
//	@Id
//	@GeneratedValue(generator = "tableGenerator")
//	@GenericGenerator(name = "tableGenerator", strategy = "uuid")
//	@Column(name = "id", nullable = false, length = 32, unique = true)
//	public String getId() {
//		return this.id;
//	}
//	/**
//	 * @param id
//	 *            the id to set
//	 */
//	public void setId(String id) {
//		this.id = id;
//	}
	@Column(name = "f_app_id")
	public String getAppId() {
		return this.appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	@Column(name = "f_app_secret")
	public String getAppSecret() {
		return this.appSecret;
	}

	public void setAppSecret(String appSecret) {
		this.appSecret = appSecret;
	}

	@Column(name = "f_account_access_token", length = 512)
	public String getAccessToken() {
		return this.accessToken;
	}

	public void setAccessToken(String accessToken) {
		this.accessToken = accessToken;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "f_add_token_time")
	public Date getTime() {
		return this.time;
	}

	public void setTime(Date time) {
		this.time = time;
	}
	@Column(name = "f_js_api_ticket", length = 512)
	public String getJsapiTicket() {
		return this.jsapiTicket;
	}

	public void setJsapiTicket(String jsapiTicket) {
		this.jsapiTicket = jsapiTicket;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "f_add_js_api_ticket_time")
	public Date getJsapiTime() {
		return this.jsapiTime;
	}

	public void setJsapiTime(Date jsapiTime) {
		this.jsapiTime = jsapiTime;
	}
}
